
#Region "Using Directives"

Imports System

#End Region

Namespace C4F.DevKit.Bluetooth.ObjectPushProfile

#Region "ObjectPushBeginEventArgs"

    ''' <summary>
    ''' EventArgs class to be used when an Object Push operation begins.
    ''' </summary>
    Public Class ObjectPushBeginEventArgs
        Inherits EventArgs

#Region "Private Fields"

        ''' <summary>
        ''' The name of the object that is being pushed.
        ''' </summary>
        Private m_localObjectName As String

        ''' <summary>
        ''' The user-supplied state object supplied when the asynchronous 
        ''' operation was requested.
        ''' </summary>
        Private m_userState As Object

#End Region

#Region "Public Properties"

        ''' <summary>
        ''' Gets the name of the object that is being pushed to the remote 
        ''' device.
        ''' </summary>
        Public ReadOnly Property LocalObjectName() As String

            Get
                Return Me.m_localObjectName
            End Get

        End Property

        ''' <summary>
        ''' Gets the user-supplied state object supplied when the asynchronous
        ''' operation was requested.
        ''' </summary>
        Public ReadOnly Property UserState() As Object

            Get
                Return Me.m_userState
            End Get

        End Property

#End Region

#Region "Constructors"

        ''' <summary>
        ''' Initializes the ObjectPushBeginEventArgs object.
        ''' </summary>
        ''' <param name="localObjectName">The name of the object that is being 
        ''' pushed to the remote device.</param>
        ''' <param name="userState">The user-supplied state object supplied 
        ''' when the asynchronous operation was requested.</param>
        ''' <exception cref="ArgumentNullException">LocalObjectName is passed
        ''' as an empty string or a null reference.</exception>
        Public Sub New(ByVal localObjectName As String, ByVal userState As Object)

            MyBase.New()

            If String.IsNullOrEmpty(localObjectName) Then
                Throw New ArgumentNullException("localObjectName")
            End If

            With Me

                .m_localObjectName = localObjectName
                .m_userState = userState

            End With

        End Sub

#End Region

    End Class

#End Region

End Namespace
